<html><head><title>Window.pb</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font><font color="#3A3966">;   PureBasic - Window example file
</font><font color="#3A3966">;
</font><font color="#3A3966">;    (c) Fantaisie Software
</font><font color="#3A3966">;
</font><font color="#3A3966">; ------------------------------------------------------------
</font><font color="#3A3966">;
</font>
<font color="#3A3966">;
</font><font color="#3A3966">; Open a window, and do some stuff with it...
</font><font color="#3A3966">;
</font>
<b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenWindow</font>(0, 100, 200, 195, 260, &quot;PureBasic Window&quot;, <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_MinimizeGadget</font> | <font color="#924B72">#PB_Window_MaximizeGadget</font>)

<font color="#3A3966">  MessageRequester</font>(&quot;Information&quot;, &quot;Click to move the Window&quot;, 0)
<font color="#3A3966">  ResizeWindow</font>(0, 200, 200, <font color="#924B72">#PB_Ignore</font>, <font color="#924B72">#PB_Ignore</font>)   <font color="#3A3966">; Move the window to the coordinate 200,200
</font>  
<font color="#3A3966">  MessageRequester</font>(&quot;Information&quot;, &quot;Click to resize the Window&quot;, 0)
<font color="#3A3966">  ResizeWindow</font>(0, <font color="#924B72">#PB_Ignore</font>, <font color="#924B72">#PB_Ignore</font>, 320, 200) <font color="#3A3966">; Resize the window to 320,200
</font>  
  <font color="#3A3966">;
</font>  <font color="#3A3966">; This is the 'event loop'. All the user actions are processed here.
</font>  <font color="#3A3966">; It's very easy to understand: when an action occurs, the Event
</font>  <font color="#3A3966">; isn't 0 and we just have to see what have happened...
</font>  <font color="#3A3966">;
</font>
  <b><font color="#3A3966">Repeat</font></b>
    Event =<font color="#3A3966"> WaitWindowEvent</font>()

    <b><font color="#3A3966">If</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>  <font color="#3A3966">; If the user has pressed on the close button
</font>      Quit = 1
    <b><font color="#3A3966">EndIf</font></b>

  <b><font color="#3A3966">Until</font></b> Quit = 1
  
<b><font color="#3A3966">EndIf</font></b>

<b><font color="#3A3966">End</font></b>   <font color="#3A3966">; All the opened windows are closed automatically by PureBasic
</font></font></pre>
</body></html>
